#!/bin/bash

# Logging installation to FileWave Client fwcld.log
exec 1>>/var/log/fwcld.log
exec 2>>/var/log/fwcld.log

# Attach the dmg
hdiutil attach /usr/local/etc/FileWaveInstallers/csc-readable.dmg

# Install from mounted volume
installer -pkg "/Volumes/Cisco Secure Client 5.1.15.287/Cisco Secure Client.pkg" \
-applyChoiceChangesXML "/usr/local/etc/FileWaveInstallers/install_choices.xml" \
-target /

sleep 30

# Detach
hdiutil detach "/Volumes/Cisco Secure Client 5.1.15.287"

exit 0